# Maintainer: Ivan Semkin (ivan at semkin dot ru)

pkgname=click-git
_pkgname=click
pkgver=r1079.28b9c13
pkgrel=2
pkgdesc='Click is a simplified packaging format'
url='https://github.com/ubports/click'
arch=(x86_64 i686 armv7h aarch64)
license=()
conflicts=(click)
provides=(click)
depends=(libgee json-glib)
makedepends=(git cmake intltool vala gobject-introspection)
source=('git+https://github.com/ubports/click.git')
sha256sums=('SKIP')

BUILDENV+=('!check') # Tests broken due to absense of dpkg

pkgver() {
  cd ${_pkgname}
  echo "r$(git rev-list --count HEAD).$(git describe --always)"
}

prepare() {
  cd ${_pkgname}
  git checkout bionic
}

build() {
  cd ${_pkgname}
  ./autogen.sh 
  ./configure --prefix=/usr --disable-packagekit
  make
}

check() {
  cd ${_pkgname}
  make check
}

package() {
  cd ${_pkgname}
  make DESTDIR="${pkgdir}/" PYTHON_INSTALL_FLAGS="--root=${pkgdir}/" install
}
# vim:set ts=2 sw=2 et:
